#pragma once

#include <QString>
#include <QColor>
#include <QList>

namespace kernel {

enum class StationType {
    Normal,
    Charge,
    Fork,
    Park
};

struct Position {
    double x{0.0};
    double y{0.0};

    Position() = default;
    Position(double x, double y) : x(x), y(y) {}
};

struct MapHeader {
    QString mapType;
    QString mapName;
    Position minPos;
    Position maxPos;
    double resolution{1.0};
};

struct MapProperty {
    QString key;
    QString type;
    QString value;
};

struct StationPoint {
    QString className;
    QString instanceName;
    Position position;
    double direction{0.0};
    MapProperty property;
    bool ignoreDirection{false};
    StationType stationType{StationType::Normal};
    QList<int> allowedAgvNumbers;
    int vertex{0};
    bool isSelected{false};
};

struct Area {
    QString className;
    QString instanceName;
    Position corners[4];
    MapProperty properties[2];
};

struct BezierPath {
    QString className;
    QString instanceName;
    StationPoint startPoint;
    StationPoint endPoint;
    Position controlPoint1;
    Position controlPoint2;
    MapProperty properties[2];
    double length{0.0};
    QColor color{Qt::black};
};

struct ArcPath {
    QString className;
    StationPoint startPoint;
    StationPoint endPoint;
    Position controlPoint;
    MapProperty property;
};

struct StraightPath {
    QString className;
    QString instanceName;
    StationPoint startPoint;
    StationPoint endPoint;
    MapProperty property;
};

} // namespace kernel